Optimal. Leaf size=20 \[ -\frac {b \log (b+a \sin (x))}{a^2}+\frac {\sin (x)}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {3957, 2912, 12,
45} \begin {gather*} \frac {\sin (x)}{a}-\frac {b \log (a \sin (x)+b)}{a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 45
Rule 2912
Rule 3957
Rubi steps
\begin {align*} \int \frac {\cos (x)}{a+b \csc (x)} \, dx &=\int \frac {\cos (x) \sin (x)}{b+a \sin (x)} \, dx\\ &=\frac {\text {Subst}\left (\int \frac {x}{a (b+x)} \, dx,x,a \sin (x)\right )}{a}\\ &=\frac {\text {Subst}\left (\int \frac {x}{b+x} \, dx,x,a \sin (x)\right )}{a^2}\\ &=\frac {\text {Subst}\left (\int \left (1-\frac {b}{b+x}\right ) \, dx,x,a \sin (x)\right )}{a^2}\\ &=-\frac {b \log (b+a \sin (x))}{a^2}+\frac {\sin (x)}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 19, normalized size = 0.95 \begin {gather*} \frac {-b \log (b+a \sin (x))+a \sin (x)}{a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 31, normalized size = 1.55
method | result | size |
derivativedivides | \(\frac {1}{a \csc \left (x \right )}+\frac {b \ln \left (\csc \left (x \right )\right )}{a^{2}}-\frac {b \ln \left (a +b \csc \left (x \right )\right )}{a^{2}}\) | \(31\) |
default | \(\frac {1}{a \csc \left (x \right )}+\frac {b \ln \left (\csc \left (x \right )\right )}{a^{2}}-\frac {b \ln \left (a +b \csc \left (x \right )\right )}{a^{2}}\) | \(31\) |
risch | \(\frac {i b x}{a^{2}}-\frac {i {\mathrm e}^{i x}}{2 a}+\frac {i {\mathrm e}^{-i x}}{2 a}-\frac {b \ln \left ({\mathrm e}^{2 i x}-1+\frac {2 i b \,{\mathrm e}^{i x}}{a}\right )}{a^{2}}\) | \(58\) |
norman | \(\frac {2 \tan \left (\frac {x}{2}\right )}{a \left (\tan ^{2}\left (\frac {x}{2}\right )+1\right )}+\frac {b \ln \left (\tan ^{2}\left (\frac {x}{2}\right )+1\right )}{a^{2}}-\frac {b \ln \left (b \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+2 a \tan \left (\frac {x}{2}\right )+b \right )}{a^{2}}\) | \(59\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 20, normalized size = 1.00 \begin {gather*} -\frac {b \log \left (a \sin \left (x\right ) + b\right )}{a^{2}} + \frac {\sin \left (x\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.25, size = 20, normalized size = 1.00 \begin {gather*} -\frac {b \log \left (a \sin \left (x\right ) + b\right ) - a \sin \left (x\right )}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos {\left (x \right )}}{a + b \csc {\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 21, normalized size = 1.05 \begin {gather*} -\frac {b \log \left ({\left | a \sin \left (x\right ) + b \right |}\right )}{a^{2}} + \frac {\sin \left (x\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 20, normalized size = 1.00 \begin {gather*} -\frac {b\,\ln \left (b+a\,\sin \left (x\right )\right )-a\,\sin \left (x\right )}{a^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________